const { sequelize, DataTypes } = require('../../utill/getSequelize')

//支撑环节权重表
const Weight_Support_link = sequelize.define('Weight_Support_link', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },



  class_target_name: {//课程目标id      改了
    type: DataTypes.STRING,
    allowNull: false,
  },


 
  suppore: {//支撑环节
    type: DataTypes.STRING,
    allowNull: false,
  },


  weight: {//权重系数
    type: DataTypes.FLOAT,
    allowNull: false,
  },


  t_user_and_a_c_s_id: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },


});


//同步模型和数据库表
(async () => {
  try {
    await sequelize.sync({ force: false });
    console.log('All models were synchronized successfully.');
  } catch (error) {
    console.log(error);
  }

})();

//提供出去
module.exports = { Weight_Support_link };